package com.tiancheng.trade.order.vo.api;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: likailun
 * @Description: 订单批次
 * @Date: create in 2023/5/30 14:37
 */
@Getter
@Setter
public class OrderBatchVO {
    // 用户id
    @NotEmpty(message = "用户id不允许空")
    private String uid;
    @NotEmpty(message = "订单批次号不允许空")
    private String batchId;
    // 业务渠道来源
    @NotEmpty(message = "业务渠道来源不允许空")
    private String orderSource;
    // 订单名称
    @NotEmpty(message = "订单名称不允许空")
    private String orderName;
    /**
     * 订单金额
     */
    private Integer orderAmount;
    /**
     * 交易信息
     */
    @NotEmpty(message = "交易信息不允许空")
    private String tradeInfo;
    // 下单时间
    @NotNull(message = "下单时间不允许空")
    private LocalDateTime createTime;
    /**
     * 系统来源
     * @see com.cloud.trade.order.enums.SystemSourceEnum
     */

    private String systemSource;
    @NotEmpty(message = "订单信息不允许为空")
    private List<Order> orders;

    @Data
    public static class Order{
        @NotEmpty(message = "订单id不允许空")
        private String orderId;
        private Integer orderAmount;
    }
}
